package com.ruoyi.novel.mapper;

import java.util.List;
import com.ruoyi.novel.domain.Bookshelf;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 用户书架Mapper接口
 * 
 * @author fst
 * @date 2025-04-08
 */
@Mapper
public interface BookshelfMapper 
{

    List<Bookshelf> getBookShelfByUserId(Long userId);

    int insertBookshelf(Bookshelf bookshelf);

    Long selectNovelIdByTitle(String title);

    int updateBookshelf(Bookshelf bookshelf);

    int selectBookshelf(@Param("userId") Long userId,@Param("novelId") Long novelId);


    // BookshelfMapper.java
    int deleteBookshelf(
            @Param("userId") Long userId,
            @Param("novelId") Long novelId
    );
}
